package cn.gok.shiro.dao;

import cn.gok.shiro.entity.Perms;
import cn.gok.shiro.entity.Role;
import cn.gok.shiro.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: LKSV
 * @Description:
 * @Date:Created in  2021/8/19
 */
@Mapper
public interface UserDao {
    void save(@Param("username") String username,@Param("password") String password);

    User findByUserName(String username);

    //根据用户名查询所有角色
    List<Role> findRolesByUserName(String username);
    //根据角色id查询权限集合
    List<Perms> findPermsByRoleId(int id);
}
